package com.jiazhong.basic.shuxin.thread;

// 2️⃣线程的实现方式
public class DemoB implements Runnable {
    @Override
    public void run() {
        Thread thread = Thread.currentThread();
        String currentThreadName = thread.getName();
        for (int i = 0; i < 10; i++) {
            System.out.println(currentThreadName + "输出了：" + i);
        }
    }
}
